home *** CD-ROM | disk | FTP | other *** search
-
-
-
- SSSSyyyyssss::::::::SSSSyyyysssslllloooogggg((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222)))) SSSSyyyyssss::::::::SSSSyyyysssslllloooogggg((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- Sys::Syslog, openlog, closelog, setlogmask, syslog - Perl
- interface to the UNIX _s_y_s_l_o_g(3) calls
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- use Sys::Syslog; # all except setlogsock, or:
- use Sys::Syslog qw(:DEFAULT setlogsock); # default set, plus setlogsock
-
- setlogsock $sock_type;
- openlog $ident, $logopt, $facility;
- syslog $priority, $format, @args;
- $oldmask = setlogmask $mask_priority;
- closelog;
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- Sys::Syslog is an interface to the UNIX syslog(3) program.
- Call syslog() with a string priority and a list of printf()
- args just like syslog(3).
-
- Syslog provides the functions:
-
- openlog $ident, $logopt, $facility
- $_i_d_e_n_t is prepended to every message. $_l_o_g_o_p_t contains
- zero or more of the words _p_i_d, _n_d_e_l_a_y, _c_o_n_s, _n_o_w_a_i_t.
- $_f_a_c_i_l_i_t_y specifies the part of the system
-
- syslog $priority, $format, @args
- If $_p_r_i_o_r_i_t_y permits, logs ($_f_o_r_m_a_t, @_a_r_g_s) printed as
- by printf(3V), with the addition that %_m is replaced
- with "$!" (the latest error message).
-
- setlogmask $mask_priority
- Sets log mask $_m_a_s_k__p_r_i_o_r_i_t_y and returns the old mask.
-
- setlogsock $sock_type (added in 5.004_02)
- Sets the socket type to be used for the next call to
- openlog() or syslog() and returns TRUE on success,
- undef on failure.
-
- A value of 'unix' will connect to the UNIX domain
- socket returned by _PATH_LOG in _s_y_s_l_o_g._p_h. A value of
- 'inet' will connect to an INET socket returned by
- _g_e_t_s_e_r_v_b_y_n_a_m_e(). Any other value croaks.
-
- The default is for the INET socket to be used.
-
- closelog
- Closes the log file.
-
- Note that openlog now takes three arguments, just like
- openlog(3).
-
-
-
- Page 1 (printed 10/23/98)
-
-
-
-
-
-
- SSSSyyyyssss::::::::SSSSyyyysssslllloooogggg((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222)))) SSSSyyyyssss::::::::SSSSyyyysssslllloooogggg((((3333))))
-
-
-
- EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
- openlog($program, 'cons,pid', 'user');
- syslog('info', 'this is another test');
- syslog('mail|warning', 'this is a better test: %d', time);
- closelog();
-
- syslog('debug', 'this is the last test');
-
- setlogsock('unix');
- openlog("$program $$", 'ndelay', 'user');
- syslog('notice', 'fooprogram: this is really done');
-
- setlogsock('inet');
- $! = 55;
- syslog('info', 'problem was %m'); # %m == $! in syslog(3)
-
-
- DDDDEEEEPPPPEEEENNNNDDDDEEEENNNNCCCCIIIIEEEESSSS
- SSSSyyyyssss::::::::SSSSyyyysssslllloooogggg needs _s_y_s_l_o_g._p_h, which can be created with h2ph.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- the _s_y_s_l_o_g(_3) manpage
-
- AAAAUUUUTTTTHHHHOOOORRRR
- Tom Christiansen <_t_c_h_r_i_s_t@_p_e_r_l._c_o_m> and Larry Wall
- <_l_a_r_r_y@_w_a_l_l._o_r_g>. UNIX domain sockets added by Sean
- Robinson <_r_o_b_i_n_s_o_n__s@_s_c._m_a_r_i_c_o_p_a._e_d_u> with support from Tim
- Bunce <Tim.Bunce@ig.co.uk> and the perl5-porters mailing
- list.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 2 (printed 10/23/98)
-
-
-
-